fixed compilation on system without strdup.