Fix push registration to support ios8.