make unit tests robust against environment in which 'module' function is not defined