fix dynamic require for alternative runtimes like node-webkit