Fix code to compile in strict mode