Right now, I only looked at analogWrite, from wiring_analog.c. I just checked the file header, look like it have never been updated for the ATtiny87 or ATtiny167 so it might be upstream fault.
What I have seen is at line 127 and 148, sbi(TCCR1B, WGM10) which set the bit WGM10 of register TCCR1B. WGM10 is a bit of TCCR1A, not TCCR1B. The correct name for the bit is CS10 (same value).
Also, if I read correctly, only pin PB0 and PB1 can be used for PWM while ATtiny167 can output PWM on all PBx pin.