[DROOLS-372] fix jitting of constraint using Serializable
(cherry picked from commit 28f951fe7b6165c0123554f1ff68823b8c2a45d3)