Fix for trema/trema#292
Replace casts to remove constness by copying. (trema/trema#292)
Merge pull request #294 from y-higuchi/switchd_branching

Fix for trema/trema#292