Support both CommonJS and AMD