acl: fix undefined behavior of bit shifts