Add -D_XOPEN_SOURCE=600 to host cflags to make the constants in math.h available. Include math.h where necessary and remove redundant M_PI defines.
This is consistent with how all other table generation programs are named. Moreover this ensures that the cos table generation program is correctly deleted when cleaning the tree.