Macos build merge

Can now compile on both mac os and lxplus6