fix build for POSIXSHARED target