Adding support for require.resolve. (kevinswiber)