Define ARRAY_SIZE macro if it is not provided by Xorg headers

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>