Running ns-3.11 and ns-3.12.1 on FreeBSD-8.2

The following patches allow the ns-3 network simulator, versions 3.11 and 3.12.1 to compile and run on FreeBSD 8.2, with all core tests passing. The patch for ns-3.11 fixes includes and missing declarations, while that for ns-3.12.1 also updates FindSelfDirectory() in src/core/model/system-path.cc to work on FreeBSD.