Recaptcha error

Recaptcha is working but for some reason I’m getting an error:

“Uncaught ReferenceError: grecaptcha is not defined”

I tried putting it in startup but that didn’t solve it. Here is my code:

Template.share.rendered = function() {

$.getScript(“https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit”, function() {
onloadCallback();
console.log(‘reCaptcha Loaded’);
});

onloadCallback = function () {

grecaptcha.render('recaptcha1', {
    'sitekey' : 'SITE_KEY',
    'theme' : 'light'
});

};
};