Fixed problems with compilation and gcc version