apns: fix compile errors