fix compilation for mac