Rewriten the code to prevent the error if Modernizr isn't available. 

While checking the plugin on Safari 5, my images wouldn't show. The JS console showed 'Modernizr is not defined'. The check was wrong and I fixed it