fixing AMD implementation, throwing if jQuery plugin isn't loaded