fix compability errors with rust v0.12, static -> const