Effective constraint algebras with structure functions