strdup not available on every platform