Work is due to begin to repair a library in Bournemouth which has been closed for more than six months.