fix for servermode, add option to enable servermode for building (false by default)