Fixed errors and warning when --enable-maintainer-zts is used