[tilem] Fix for -Werror=incompatible-pointer-types, fix type for g_new