Added define for __attribute__ to make code more portable