Fixing strdup() related warnings
Clean solution to strdup() not being in ISO C.