Thermal expansion and magnetostriction in a polycrystalline YBa2Cu3O7 superconductor