avoid javascript error if theres no console object