fix broken cast of GetProcAddress returned pointer