Added better compatibility with Node. Made sure it always exports