Check that the callback to gapi is defined prior to sourcing.

apis.google.com/js/client.js requires the onload callback
to be defined before loading the script. This change
throws an exception of that is not the case.