[posixdirectory] added missing code

Thanks @Karlson2k for the heads up.
Looks like it is needed. @sraue had to include it in order to compile an OpenELEC gotham test build for me.