support for global collision callbacks in JS