Linux: fixed compilation errors in Ubuntu 14.04
Windows: Fixed Windows compilation error caused by #322