apn_error_invalid_token() returned incorrect token. Tnx  Markus Trenkwalder
#ifdef _WIN32 instead of #ifndef _WIN32. Tnx  Markus Trenkwalder