stronger check on module

karma uses `module` as a function as well, but `NProgress` should live in the window object if it's run by karma.

from http://addyosmani.com/writing-modular-js/