scope: build properly on GNU/Hurd

The scope plugin currently does not build on GNU/Hurd. These patches fix the issue by properly detecting BSD flavours (and not misdetecting GNU/Hurd as one) and defining PATH_MAX as GNU/Hurd has no such limitation.