Improve custom build rule for apr.h