small cleanup in src/compat .h and .cpp

- add license header
- fix include guards
- fix indentation