fix for the implict definition of close on some platforms