Move utils outside core and fix gyp build