only load mmmagic on server side.
when using browserify, need to use --im to ingore loading error for
require('mmmagic')