Fix PaperScript support on Node.js

Closes #470.