Fix JS errors when console[log|warn|error] are not all defined