Avoid console errors

Use script from HTML5 Boilerplate to avoid console errors. 
https://github.com/h5bp/html5-boilerplate/blob/master/js/plugins.js
Merge pull request #466 from touffies/patch-2

Avoid JS console errors