Avoid JS console errors

Use script from HTML5 Boilerplate to avoid console errors. 
https://github.com/h5bp/html5-boilerplate/blob/master/js/plugins.js