Made two function internal
Fixes for gcc
Added compat.c w/ ct_strdup() to avoid further trouble w/ strdup/_strdup on MSVC