Allow registering scripts as async, [closes #1724]