fix compile/link errors on linux