Fix production build.

- Add resource name helper to avoid name mangling issues.
- Initialize $ explicitly inside the backbone namespace.