support browserify, where require can return null

Fix #1 

Work for you?