Japan says working towards freeing hostage and Jordan pilot