Grunt 0.4 compatibility

Please integrate these small changes for Grunt 0.4 compatibility if you find them useful.