joel4: make segment macro safer

By adding bitmasks for each field, the macro used to build a segment descriptor
is made safer by eliminating potential overflows between fields.

Signed-off-by: jnider <joel@nider.org>