Move module constants into cdef

As suggested by @bastibe in #31.