corrected gruntfile and added window.crypto check