Removed specific test for 500 error to comply with Google's documentation:

Errors in the 500-599 range (such as 500 or 503) indicate that there wa an
internal error in the GCM server while trying to process the request, or
that the server is temporarily unavailable (for example, because of
timeouts). Sender must retry later, honoring any Retry-After header
included in the response. Application servers must implement exponential
back-off.

https://developer.android.com/google/gcm/http.html
Added some compatability support for InternalServerError.