require application as if it was the main module

This requires use of an undocumented node API, I've checked it for node
v0.10 and node v0.11.