Fixed how amd and node module stuff is discovered