add requirejs support - fixes #2