Revert "do not use compat.h"

Still need strlcpy and a few other functions

This reverts commit bf715acb98e486ae05f53c5f6fd3097ef951e229.