Fixed bug causing dependencies to break

Was using require instead of define which caused the
code to be required instead of defined. All modules and
extensions using this need to be updated to this patch
otherwise they are in an unstable state. Any reason for
them working was some combination of luck and slow network.