moved call to pluginsDir() out of header to fix compile #352