Fixed compatibility problems against Java < 7