Merge pull request #1 from MichaelSchoebel/fpc-linux

Some preparatory work to get everything to compile with FPC on Linux
Fixed several compile-errors with FPC on Linux
More changes to compile with FPC on Linux