Macos build merge

Can now compile on both lxplus6 and mac os X