Add attr.h file which is somehow lost in commit chain

You somehow squashed my pull request #190 with bad commit name and lost `attr.h` file in the process. I think there is something wrong with your workflow. Let me know if I can help you.

In the meantime, this patch is submitted under MIT License.