Add conditional module.exports support