Wrap source in function to simulate commonjs wrapper