Check if running in node before exporting