function to unrequire a module