Fix calling BelongsToMany::detach() with a single id (Fixes #5593)

See issue https://github.com/laravel/framework/issues/5593