Make this module work with component.

For me, this module was not working with component because 'module' is an object, not a function.