adaptation for hammerhead

Can we sync this also to libhybris? https://github.com/libhybris/libhybris/blob/master/utils/extract-headers.sh