Hazrat Ibn Sirin says that offer the funeral prayer for the fetus and give it a name because it was born on the nature of Islam.