fix #149

strndup undefined ... woops