some fixes for 64-bit systems. Mainly changed some FT_TRACE calls to use %p instead of %lx when dumping a pointer address