Man who gave birth loses anonymity in his bid to be registered as father on birth certificate