Fixed JNotify load detection

This ensures that dev mode works on FreeBSD.

Backport to 2.3.x required.